Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 5 - Attribute Objects / Attribute Objects Reference
Application-Defined Routines /


TQ3AttributeCopyInheritMethod

You can define an attribute inheritance method to copy attributes during inheritance.

typedef TQ3Status (*TQ3AttributeCopyInheritMethod) (
const void *fromInternalAttribute,
void *toInternalAttribute);
fromInternalAttribute
A pointer to the attribute data associated with an attribute having your custom attribute type.
toInternalAttribute
On entry, a pointer to an uninitialized block of memory large enough to contain the attribute data associated with an attribute having your custom attribute type.
DESCRIPTION
Your TQ3AttributeCopyInheritMethod function should copy the attribute data pointed to by the fromInternalAttribute parameter into the location pointed to by the toInternalAttribute parameter. This method is called whenever the Q3AttributeSet_Inherit function is used to copy an attribute of your custom type from one set to another set.

You should strive to make your TQ3AttributeCopyInheritMethod method as fast as possible. For example, if your custom element contains objects, you should call the Q3Shared_GetReference function instead of the Q3Object_Duplicate function.

RESULT CODES
Your TQ3AttributeCopyInheritMethod function should return kQ3Success if it is successful and kQ3Failure otherwise.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996